Skip to content

fix: Check for performance.timing in webworkers - #2491

Merged
HazAT merged 5 commits into
masterfrom
fix/timing
Mar 12, 2020
Merged

fix: Check for performance.timing in webworkers#2491
HazAT merged 5 commits into
masterfrom
fix/timing

Conversation

@HazAT

@HazAT HazAT commented Mar 12, 2020

Copy link
Copy Markdown
Member

Fixes #2488

@HazAT
HazAT requested a review from rhcarvalho March 12, 2020 08:49
@HazAT
HazAT requested a review from kamilogorek as a code owner March 12, 2020 08:49
@HazAT HazAT self-assigned this Mar 12, 2020
Comment thread packages/utils/src/misc.ts Outdated
Comment on lines +375 to +383
// tslint:disable-next-line:deprecation
if (!performance.timing) {
return performanceFallback;
}
// tslint:disable-next-line:deprecation
if (!performance.timing.navigationStart) {
return performanceFallback;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too early? We may have access to performance.timeOrigin and that's our preferred value to use.

@getsentry-bot

Copy link
Copy Markdown
Contributor
Messages
📖

@sentry/browser bundle gzip'ed minified size: (ES5: 16.8887 kB) (ES6: 15.9277 kB)

📖 ✅ TSLint passed

Generated by 🚫 dangerJS against 2b93d5c

@HazAT
HazAT merged commit c629a0d into master Mar 12, 2020
@HazAT
HazAT deleted the fix/timing branch March 12, 2020 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: null is not an object (evaluating 'performance.timing.navigationStart') in web worker!

4 participants